/*
 * Copyright (c) 2018. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
 * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
 * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
 * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
 * Vestibulum commodo. Ut rhoncus gravida arcu.
 */

package com.gov.dna.base.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import io.swagger.annotations.ApiModelProperty;

/**
 * 节点基础类 用于处理子父层级
 * @author (作者) Dong Jie 154046519@qq.com
 * @version V1.0
 * @date 2018/12/7 10:46
 * @since (该版本支持的JDK版本) 1.8
 */
public abstract class BaseNode<T extends BaseNode> extends BaseModel<BaseNode> {

	@TableField(exist = false)
	@ApiModelProperty(value="节点名称")
	private String nodeLabel;


	@ApiModelProperty(value="父节点id")
	private Long nodeFatherId;


	@ApiModelProperty(value="节点编码")
	private String nodeCode;

	/**
	 * 设置节点名称字段
	 * @author (作者) Dong Jie 154046519@qq.com
	 * @param
	 * @return java.lang.String
	 * @date 2018/12/7 10:52
	 */
	public abstract String nodeLabelField();

	public String getNodeLabel() {
		return nodeLabelField();
	}

	public void setNodeLabel(String nodeLabel) {
		this.nodeLabel = nodeLabel;
	}

	public Long getNodeFatherId() {
		return nodeFatherId;
	}

	public void setNodeFatherId(Long nodeFatherId) {
		this.nodeFatherId = nodeFatherId;
	}

	public String getNodeCode() {
		return nodeCode;
	}

	public void setNodeCode(String nodeCode) {
		this.nodeCode = nodeCode;
	}

}
